package com.xatu.yl.util.baiduGPS;


import com.baidu.idl.face.platform.LivenessTypeEnum;
import com.baidu.mapapi.SDKInitializer;


import android.app.Application;
import android.app.Service;
import android.content.Context;
import android.os.Vibrator;

import java.util.ArrayList;
import java.util.List;

/**
 * 主Application，所有百度定位SDK的接口说明请参考线上文档：http://developer.baidu.com/map/loc_refer/index.html
 *
 * 百度定位SDK官方网站：http://developer.baidu.com/map/index.php?title=android-locsdk
 * 
 * 直接拷贝com.baidu.location.service包到自己的工程下，简单配置即可获取定位结果，也可以根据demo内容自行封装
 */
public class LocationApplication extends Application {

    public static List<LivenessTypeEnum> livenessList = new ArrayList<LivenessTypeEnum>();
    public static boolean isLivenessRandom = false;

	public LocationService locationService;
    public Vibrator mVibrator;

    private static Context context;
    @Override
    public void onCreate() {
        super.onCreate();
        /***
         * 初始化定位sdk，建议在Application中创建
         */
        context = getApplicationContext();
        locationService = new LocationService(this);
        mVibrator =(Vibrator)getApplicationContext().getSystemService(Service.VIBRATOR_SERVICE);
        SDKInitializer.initialize(this);
       
    }

    public static Context getContext() {
        return context;
    }
}
